package com.wuliang.blog.core.jpa.adapter;

import com.wuliang.blog.core.basic.BasicEntity;
import com.wuliang.blog.core.jpa.EntityFieldTypeAdapter;

import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.From;
import javax.persistence.criteria.Predicate;
import java.util.Map;

public class MapFieldTypeAdapter implements EntityFieldTypeAdapter<Map<String, Object>> {

    @Override
    public Predicate toPredicate(Class<? extends BasicEntity> entity, CriteriaBuilder criteriaBuilder, String fieldName,
                                 Map<String, Object> fieldValue, From<Object, Map<String, Object>> from) {
        fieldValue.forEach((key, value) -> {

        });
        return null;
    }
}
